import Vue from 'vue'
import Router from 'vue-router'
//import Login from '../components/Login.vue'
// import Retrieve from '../components/Retrieve.vue'
// import Notice from '../components/Notice.vue'
// import Help from '../components/Help.vue'
// import Home from '../components/Home.vue'
// import edit from '../packages/editInfo.vue'
// import BoxShowtime from '../components/boxShowtime.vue'
// import CardShowtime from '../components/cardShowtime.vue'
// import SysShowtime from '../components/sysShowtime.vue'

const Login = r => require.ensure([], () => r(require('../components/Login.vue')), 'login')
const Retrieve = r => require.ensure([], () => r(require('../components/Retrieve.vue')), 'retrieve')
const Notice = r => require.ensure([], () => r(require('../components/Notice.vue')), 'notice')
const Help = r => require.ensure([], () => r(require('../components/Help.vue')), 'help')
const Home = r => require.ensure([], () => r(require('../components/Home.vue')), 'home')
const edit = r => require.ensure([], () => r(require('../packages/editInfo.vue')), 'editInfo')
const BoxShowtime = r => require.ensure([], () => r(require('../components/boxShowtime.vue')), 'boxShowtime')
const CardShowtime = r => require.ensure([], () => r(require('../components/cardShowtime.vue')), 'cardShowtime')
const SysShowtime = r => require.ensure([], () => r(require('../components/sysShowtime.vue')), 'sysShowtime')
const welcome = r => require.ensure([], () => r(require('../components/welcome.vue')), 'welcome')



Vue.use(Router)

export default new Router({
    mode: 'history',
    saveScrollPosition: true,
    routes: [
        {
            path: '/',
            redirect: '/login'
        }, {
            path: '/login',
            name: 'Login',
            component: Login
        }, {
            path: '/retrieve',
            name: 'Retrieve',
            component: Retrieve
        }, {
            path: '/notice',
            name: 'Notice',
            component: Notice
        }, {
            path: '/help',
            name: 'Help',
            component: Help
        }, {
            path: '/home',
            name: 'home',
            component: Home
        }, {
            path: '/info',
            name: 'info',
            component: edit
        },
        {
            path: '/boxShowTime',
            name: 'boxShowTime',
            component: BoxShowtime
        },
        {
            path: '/cardShowTime',
            name: 'cardShowTime',
            component: CardShowtime
        },
        {
            path: '/sysShowTime',
            name: 'sysShowTime',
            component: SysShowtime
        },
        {
            path: '/welcome',
            name: 'welcome',
            component: welcome
        }

    ]
})
